import React, { useRef } from 'react'

export default function App() {
  const ref = useRef()
  return (
    <div ref={ref}>
      <button
        onClick={() => {
          console.log(ref)
        }}
      >
        按钮
      </button>
    </div>
  )
}
